import { service } from '@/service'
const baseUrl='/hbsys-system/annualActivity'


//查询活动列表
export const getList = (params) => {
  return service.request({
    url: `${baseUrl}/queryByPage`,
    method: 'GET',
    params
  })
}

export const getListReport = (params) => {
  return service.request({
    url: `/hbsys-system/activityReport/queryByPage`,
    method: 'GET',
    params
  })
}

//是否推送活动
export const pushState = (id,isPush) => {
  return service.request({
    url: '/hbsys-system/annualActivity/isPush?id=' + id+'&isPush='+isPush,
    method: 'POST'
  })
}
//审核活动
export const toCheck = (data) => {
  return service.request({
    url: `${baseUrl}/audit`,
    method: 'POST',
    data
  })
}

//获取活动详情
export const getDetail = (id) => {
  return service.request({
    url: `${baseUrl}/queryById?id=${id}`,
    method: 'GET',
  })
}

//活动点赞
export const setLike = (id) => {
  return service.request({
    url: `${baseUrl}/like?id=${id}`,
    method: 'GET',
  })
}

export default { getList ,toCheck,getDetail,setLike}
